<script>
  import { navigate } from "svelte-routing";

  export let onLogin;

  function handleLogin() {
    onLogin();
    navigate("/");
  }
</script>

<h1>登录</h1>
<button on:click={handleLogin} class="btn btn-primary">登录</button>
